#ifndef CGAL_MESH_H
#define CGAL_MESH_H

#include <QtWidgets/QMainWindow>
#include "ui_cgal_mesh.h"
#include "TriMesh.h"
#include "glViewer.h"

class CGAL_Mesh : public QMainWindow
{
	Q_OBJECT

public:
	CGAL_Mesh(QWidget *parent = 0);
	~CGAL_Mesh();

public:
	void			initialize();

public Q_SLOTS:
	//load mesh
	void			loadModel();
	void			saveModel();
	//draw state
	void			showMeshEdges();
	void			showMeshPoints();
	void			showMeshTriangles();

Q_SIGNALS:
	void			showMesh(const CTriMesh& mesh);
	void			drawMeshByEdges(bool val);
	void			drawMeshByPoints(bool val);
	void			drawMeshByTriangles(bool val);

protected:
	CTriMesh*		mesh_;
	GLViewer*		glViewer_;

private:
	Ui::CGAL_MeshClass ui;
};

#endif // CGAL_MESH_H
